package com.dz.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class OrdersSubmitDTO implements Serializable {
    //地址簿id
    @NotNull(message = "地址不能为空")
    private Long addressBookId;

    //付款方式
    @DecimalMin(value = "1",message = "支付方式异常")
    private int payMethod;

    //备注
    private String remark;

    //预计送达时间
    @NotNull(message = "必须选择一个送达时间哦")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime estimatedDeliveryTime;

    //配送状态  1立即送出  0选择具体时间
    @DecimalMax(value = "1",message = "配送状态异常")
    private Integer deliveryStatus;

    //餐具数量
    private Integer tablewareNumber;

    //餐具数量状态  1按餐量提供  0选择具体数量
    private Integer tablewareStatus;

    //打包费
    @NotNull(message = "打包费异常")
    private Integer packAmount;

    //总金额
    @NotNull(message = "总金额异常")
    private BigDecimal amount;
}
